package pers.goetboy.exam.controller;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import pers.goetboy.common.AbstractController;
import pers.goetboy.common.exception.service.ServiceTipsException;
import pers.goetboy.common.EntityState;
import pers.goetboy.exam.model.entity.Exam;
import pers.goetboy.exam.model.entity.Question;
import pers.goetboy.exam.services.QuestionService;


/**
 * @author goetb
 */
@RestController
@RequestMapping("/question")
public class QuestionController extends AbstractController<Question,QuestionService> {


    /**
     * 获取试题列表
     */
    @GetMapping("/list")
    public IPage<Exam> list(Integer current, Integer size) {
        return service.page(new Page(current, size));
    }

}
